str = input("请输入一段文字:")

fw = open("D:\hello.txt", "w")
fw.write(str)

fw.close()


